package com.qcxk.yuqian.rtu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qcxk.yuqian.rtu.controller.model.query.RtuSetDTO;
import com.qcxk.yuqian.rtu.controller.model.response.Response;
import com.qcxk.yuqian.rtu.entity.Rtu;
import com.qcxk.yuqian.rtu.entity.RtuSet;
import com.qcxk.yuqian.rtu.mapper.RtuMapper;
import com.qcxk.yuqian.rtu.mapper.RtuSetMapper;
import com.qcxk.yuqian.rtu.service.IRtuService;
import com.qcxk.yuqian.rtu.service.IRtuSetService;
import com.qcxk.yuqian.rtu.utils.RestUtils;
import com.qcxk.yuqian.system.component.QueryWrapperConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther lp
 * @create 2021-11-15 03:21:45
 * @describe 服务实现类
 */
@Service
public class RtuSetServiceImpl extends ServiceImpl<RtuSetMapper, RtuSet> implements IRtuSetService {
    @Autowired
    private RtuSetMapper rtuSetMapper;

    @Override
    public List<RtuSetDTO> findDataList(RtuSetDTO dto) {
        return rtuSetMapper.findRtuSetDataList(dto);
    }

    @Override
    public Response sendSettingMes(RtuSetDTO dto) {
        Response result = RestUtils.restPostFortoken("http://192.168.22.30:9999/receive/setting",dto,null, Response.class);
        return result;
    }
}
